﻿@model VietPremier.Models.GetDestinationModel

@{
    Layout = null;
}

<div id="where_we_go">
      <h5>Tour liên quan</h5>
            @if (Model != null)
            {
                <div class="box">
                    <div class="wherewego">
                        <ul id="wherewego">
                            @{                        
                int count = Model.listTravel.Count;
                int number = 0;
                for (int i = 0; i < (count % 6 == 0 ? count / 6 : count / 6 + 1); i++)
                {
                            
                                <li>
                                    @{
                    int loop = (6 * i + 6);
                    int r = (loop % 2 == 0 ? loop / 2 : loop / 2 + 1);
                    for (int j = number; j < (loop % 2 == 0 ? loop / 2 : loop / 2 + 1); j++)
                    {
                        if (2 * j < count)
                        {
                                        var imageFile = string.Concat("~/Content/upload/travelcity/", Model.listTravel[2 * j].Image);                
                                        <div class="it">
                                    <div class="img">
                                        <div class="img-inner">
                                            <a href="@Url.Action("City", "TravelInformation", new { title = Utilities.Encode(Model.listTravel[2 * j].Name), country = Utilities.Encode(Model.listTravel[2 * j].ProductName) })">
                                                <img src="@Url.Content(imageFile)" style="width:88px; height:88px"/></a>
                                        </div>
                                    </div>
                                    <a class="title" href="@Url.Action("City", "TravelInformation", new { title = Utilities.Encode(Model.listTravel[2 * j].Name), country = Utilities.Encode(Model.listTravel[2 * j].ProductName) })"><span>@Model.listTravel[2 * j].Name ...</span></a>
                                    <br />
                                    <i><small class="tripcode">@Html.Raw(Model.listTravel[2 * j].Description) ...</small></i>
                                </div>                                       
                            
                        }
                        if (2 * j + 1 < count)
                        {
                                        var imageFile = string.Concat("~/Content/upload/travelcity/", Model.listTravel[2 * j + 1].Image);
                                <div class="it">
                                    <div class="img">
                                        <div class="img-inner">
                                            <a href="@Url.Action("City", "TravelInformation", new { title = Utilities.Encode(Model.listTravel[2 * j + 1].Name), country = Utilities.Encode(Model.listTravel[2 * j + 1].ProductName) })">
                                                <img src="@Url.Content(imageFile)" style="width:88px; height:88px" /></a>
                                        </div>
                                    </div>
                                    <a class="title" href="@Url.Action("City", "TravelInformation", new { title = Utilities.Encode(Model.listTravel[2 * j + 1].Name), country = Utilities.Encode(Model.listTravel[2 * j + 1].ProductName) })"><span>@Model.listTravel[2 * j + 1].Name ...</span></a>
                                    <br />
                                    <i><small class="tripcode">@Html.Raw(Model.listTravel[2 * j + 1].Description) ...</small></i>
                                </div>
                        }
                        number = (j + 1);
                    }
                                    }
                                </li>                               
                }                       
                            }
                        </ul>
                        <div id="slide-pager">
                                            <a  href="#" id="wherewego_next"><img src="@Url.Content("~/Content/cssFrontEnd/images/btn-down.png")" /></a>
                                        </div>
                        <!--/ #slide-pager-->
                    </div>
                    <!--/ .wherewego-->
                    <div class="clear"></div>
                </div>
            }
            else{
                <h5>This page is updated content</h5>
            }
        </div>  